<template>
  <div class="container">
    <div>
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form>
            <el-form-item label="开始日期：">
              <el-date-picker
                v-model="STARTDATE"
                type="date"
                placeholderb
                filterable="选择日期"
                value-format="yyyy-MM-dd"
              ></el-date-picker>
            </el-form-item>
            <el-form-item label="结束日期：">
              <el-date-picker
                v-model="ENDDATE"
                type="date"
                placeholderb
                filterable="选择日期"
                value-format="yyyy-MM-dd"
              ></el-date-picker>
            </el-form-item>
            <el-form-item label="考核状态：">
              <el-select v-model="ZT" placeholder="请选择" clearable>
                <el-option
                  v-for="item in stateData"
                  :key="item.ZT"
                  :label="item.ZT"
                  :value="item.ZT"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-form>
        </el-col>
        <el-col :span="6">
          <el-form>
            <el-form-item label="考核单位：">
              <el-select v-model="DW" placeholder="请选择" clearable>
                <el-option
                  v-for="item in unitData"
                  :key="item.CLIENT_NO"
                  :label="item.UNITNAME"
                  :value="item.CLIENT_NO"
                >
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="考核项目：">
              <el-select v-model="XM" placeholder="请选择" clearable>
                <el-option
                  v-for="item in itemData"
                  :key="item.ID"
                  :label="item.ITEMNAME"
                  :value="item.ID"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-form>
        </el-col>
        <el-col :span="6">
          <el-form>
            <el-form-item label="考核类型：">
              <el-select v-model="LX" placeholder="请选择" clearable>
                <el-option
                  v-for="item in typeData"
                  :key="item.ID"
                  :label="item.TYPENAME"
                  :value="item.ID"
                >
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="考核对象：">
              <el-input
                v-model="NAME"
                placeholder="请输入"
                style="width: 14vw"
              ></el-input>
            </el-form-item>
          </el-form>
        </el-col>
        <el-col :span="4">
          <el-form ref="form" :model="form" style="float: left">
            <el-button size="mini" type="primary" @click="getInfoList"
              >查 询</el-button
            >
          </el-form>
        </el-col>
      </el-row>
    </div>
    <el-table
      highlight-current-row
      :data="
        originalData.slice((currentPage - 1) * pageSize, currentPage * pageSize)
      "
    >
      <el-table-column
        prop="NAME"
        label="考核对象"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="TYPENAME"
        label="考核类型"
        align="center"
      ></el-table-column>
      <!-- <el-table-column
        prop="khbz"
        label="考核内容"
        align="center"
      ></el-table-column> -->
      <el-table-column
        prop="ITEMNAME"
        label="考核项目"
        align="center"
      ></el-table-column>
      <!-- <el-table-column
        prop="khry"
        label="考核人员"
        align="center"
      ></el-table-column> -->
      <el-table-column
        prop="UNITNAME"
        label="考核单位"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="AREANAME"
        label="负责区域"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="STATUS"
        label="考核状态"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="TIMELIMIT"
        label="整改时长"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="OVERTIME"
        label="超过督办天数"
        sortable
        align="center"
        width="150"
      >
        <template slot-scope="scope">
          <i
            class="el-icon-s-opportunity"
            style="color: red"
            v-if="scope.row.OVERTIME[0] === ('0' && '超')"
          ></i>
          <span>{{ scope.row.OVERTIME }}</span>
        </template></el-table-column
      >
      <el-table-column
        prop="TASKTIME"
        label="考核时间"
        align="center"
        width="150"
      ></el-table-column>
      <el-table-column
        prop="POINT"
        label="扣分情况"
        align="center"
      ></el-table-column>
      <!-- <el-table-column
        prop="zdxtj"
        label="针对性条件"
        align="center"
      ></el-table-column> -->
      <!-- <el-table-column
        prop="cy"
        label="抽样方式"
        align="center"
        width="200"
      ></el-table-column> -->

      <el-table-column label="考核内容" align="center" width="250">
        <template slot-scope="scope">
          <el-button
            type="text"
            @click="guidanceRecord(scope.$index, scope.row)"
            >详情</el-button
          >
          <el-button
            type="text"
            @click="rectificationRecord(scope.$index, scope.row)"
            style="color: red"
            >督办</el-button
          >
          <el-button
            type="text"
            @click="handleEdit(scope.$index, scope.row)"
            style="color: orange"
            >督办记录</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <div class="pagination">
      <el-pagination
        background
        layout="total, sizes, prev, pager, next, jumper"
        :current-page="currentPage"
        :page-size="pageSize"
        :total="originalData.length"
        @size-change="handleSizeChange"
        @current-change="handlePageChange"
      ></el-pagination>
    </div>
    <!-- 弹出框 -->
    <el-dialog title="督办记录" :visible.sync="isVisibleEdit">
      <el-tabs type="border-card" style="min-height: 350px">
        <el-table :data="rectificationData" style="width: 100%" border>
          <el-table-column
            prop="CLIENT_NAME"
            label="名称"
            align="center"
          ></el-table-column>
          <!-- <el-table-column prop="YINSPECTTIME" label="接收班组长" align="center"></el-table-column> -->
          <!-- <el-table-column prop="LOCATION" label="位置" align="center" width="270px"></el-table-column> -->
          <el-table-column
            prop="CONTENT"
            label="督办意见描述"
            align="center"
            show-overflow-tooltip
          >
          </el-table-column>
          <el-table-column
            prop="UPTIME"
            label="时间"
            align="center"
            width="170px"
          ></el-table-column>
          <el-table-column
            prop="ISREAD"
            label="是否已读"
            align="center"
          ></el-table-column>
        </el-table>
      </el-tabs>
      <!-- <span slot="footer" class="dialog-footer">
        <el-button @click="isVisibleEdit = false">取 消</el-button>
        <el-button type="primary" @click="handleSubmit()">确 定</el-button>
      </span> -->
    </el-dialog>

    <el-dialog title="详情" :visible.sync="showGuidanceVisible">
      <div>
        <el-tabs type="border-card" style="min-height: 350px">
          <el-table :data="commandData" style="width: 100%" border>
            <el-table-column
              prop="TITLE"
              label="标题"
              align="center"
              width="170px"
            ></el-table-column>

            <el-table-column
              prop="SCONTENT"
              label="内容"
              align="center"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="POINT"
              label="分值"
              align="center"
              width="100px"
            ></el-table-column>
            <el-table-column label="图片" align="center">
              <template slot-scope="scope">
                <el-image
                  style="width: 40px; height: 40px; margin-top: 12px"
                  :src="scope.row.PHOTO"
                  @click="bigImage(scope.row)"
                >
                  <div slot="error" class="image-slot">
                    <i class="el-icon-picture-outline"></i></div
                ></el-image>
              </template>
            </el-table-column>
            <el-table-column label="播放" width="150">
              <template slot-scope="scope">
                <el-button
                  v-if="scope.row.AUDIO"
                  type="text"
                  icon="el-icon-headset"
                  @click="openRecording(scope.$index, scope.row)"
                  >播放录音</el-button
                >
                <el-button
                  v-if="scope.row.VEDIO"
                  type="text"
                  icon="el-icon-video-play"
                  @click="playVideo(scope.$index, scope.row)"
                  >播放视频</el-button
                >
              </template>
            </el-table-column>
          </el-table>
        </el-tabs>
      </div>
    </el-dialog>

    <el-dialog title="督办意见" :visible.sync="showRecordVisible" width="50%">
      <el-form ref="form" :model="form" label-width="5.729vw">

        <el-form-item label="督办意见：" style="height: 5vw">
          <el-input
            type="textarea"
            maxlength="30"
            :autosize="{ minRows: 5 }"
            show-word-limit
            :rows="9"
            v-model="form.CONTENT"
            placeholder="请输入"
            class="handle-input mr10"
            style="width: 37.5vw; border: 1px solid #a4aca7"
          >
          </el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="showRecordVisible = false">取 消</el-button>
        <el-button type="primary" @click="addCommand()">确 定</el-button>
      </span>
    </el-dialog>

    <!-- 修改分数窗口 -->
    <el-dialog title="修改分数" :visible.sync="isModifyScore" width="25%">
      <el-form ref="form" :model="score" label-width="5vw">
        <el-form-item label="修改分数：" label-width="110px">
          <el-input v-model="score.POINT" placeholder="请输入"></el-input>
        </el-form-item>
      </el-form>

      <span slot="footer" class="dialog-footer">
        <el-button @click="isModifyScore = false">取 消</el-button>
        <el-button type="primary" @click="changeScore()">确 定</el-button>
      </span>
    </el-dialog>
    
    <el-dialog
      title="图片展示"
      :visible.sync="showBigDialogVisible"
      width="450px"
    >
      <el-carousel :interval="5000" arrow="always">
        <el-carousel-item v-for="item in imageList" :key="item">
          <img :src="item" style="height: 100%; width: 100%" alt="图片丢失了" />
        </el-carousel-item>
      </el-carousel>
    </el-dialog>
    <el-dialog
      title="视频展示"
      :visible.sync="showVideoDialogVisible"
      width="450px"
    >
      <video
        id="videoSource"
        style="width: 100%; height: 500px"
        :src="VEDIO"
        controls="controls"
      >
        您的浏览器不支持 video 标签。
      </video>
    </el-dialog>
  </div>
</template>
<script>
import '@/assets/css/common.css'

import export2Excel from '@/utils/exportExcel/index.js'
import OSS from 'ali-oss';
import { formatDate } from '@/common/js/date.js'
export default {
  data () {

    return {
      options3: [
        { NAME: '东城南路', khlx: "日常检查", khbz: "道路积尘", khdj: "一级", khqy: "东丽东片", khry: "林文献", khsj: "2024-10-07", khdx: "道路机扫-道路", zdxtj: "黑名单", cy: "15", zt: "未整改完成", sx: "5天", sy: "4天12小时" },
        { NAME: '环城南路', khlx: "抽查考核", khbz: "道路积尘", khdj: "一级", khqy: "东丽东片", khry: "林文献", khsj: "2024-10-01 ", khdx: "道路机扫-道路", zdxtj: "上次考核不达标", cy: "15", zt: "整改待复审", sx: "5天", sy: "4天12小时" },
        { NAME: '建设路', khlx: "抽查考核", khbz: "道路积尘", khdj: "一级", khqy: "东丽东片", khry: "张明侠", khsj: "2024-09-01", khdx: "道路机扫-道路", zdxtj: "上次考核不达标,黑名单", cy: "15", zt: "未整改完成", sx: "5天", sy: "4天12小时" },
        { NAME: '南三路', khlx: "抽查考核", khbz: "道路积尘", khdj: "一级", khqy: "东丽东片", khry: "林文献", khsj: "2024-08-21", khdx: "道路机扫-道路", zdxtj: "考核覆盖率", cy: "20", zt: "未整改完成", sx: "5天", sy: "4天12小时" },
        { NAME: '北环路', khlx: "抽查考核", khbz: "道路积尘", khdj: "一级", khqy: "东丽东片", khry: "张明侠", khsj: "2024-08-01", khdx: "道路机扫-道路", zdxtj: "考核覆盖率", cy: "15", zt: "未整改完成", sx: "5天", sy: "4天12小时" },],


      STARTDATE: formatDate(new Date(new Date().getTime() - 3600 * 1000 * 24 * 30), 'yyyy-MM-dd'),
      ENDDATE: formatDate(new Date(new Date().getTime() + 3600 * 1000 * 24 * 30), 'yyyy-MM-dd'),
      DW: "",
      XM: "",
      QY: "",
      LX: "",
      ZT: "",
      NAME: "",
      typeData: [],
      unitData: [],
      itemData: [],
      clientData: [],
      stateData: [
        { ZT: '已初审' },
        { ZT: '申诉审核完成' },
        { ZT: '整改待复审' },
        { ZT: '复审不通过' },],
      currentPage: 1, //初始页
      pageSize: 10,    //    每页的数据
      originalData: [],
      tableData: [],
      commandData: [],
      select: {
        CPH: ''
      },
      isVisibleEdit: false,
      input: 1,
      inputPlaceholder: '请输入数量',
      queryType: '',
      queryTypeList: [{
        value: 1,
        label: '全部抽样'
      }, {
        value: 2,
        label: '条件抽样'
        // }, {
        //   value: 3,
        //   label: '按比例抽取'
        // // }, {
        // //   value: 3,
        // //   label: '整群抽样'
        // // }, {
        // //   value: 4,
        // //   label: '机械抽样'
      }, {
        value: 3,
        label: '地图绘制范围抽样'
      }],
      labelwidth: 100,
      addDialogTitle: '',
      form: {
        ISCHANGE: 1,
      },
      score: {
      },
      tableData: [],
      rectificationData: [],
      contentTags: ['道路路段', '环卫作业公司', '公厕'],
      contentTags2: ['考核覆盖率', '黑名单', '上次考核不达标'],
      conditionTags: ['按数量抽取', '按比例抽取', '按地图绘制范围'],
      inputVisible: false,
      inputValue: '',
      isRandom: false,
      isRandomInput: '',
      showGuidanceVisible: false,
      showRecordVisible: false,
      isModifyScore: false,
      VEDIO: '',
      showBigDialogVisible: false,
      showVideoDialogVisible: false,
      showRecordVisible: false,
    }
  },
  created () {

    // if (localStorage.getItem('CTYPE') == '0') {
    //   this.rolelevel.shift()
    // } else if (localStorage.getItem('CTYPE') != '-1') {
    //   this.rolelevel = []
    // }
    // this.getClientRoleList()
  },
  mounted () {
    this.getUnitList()
    this.getTypeList()
    this.getItemList()
    this.getInfoList()
  },
  methods: {
    // 获取考核单位列表
    async getUnitList () {
      var url = 'Assess/GetUnit_Assess?UNITNAME='
      let { data } = await this.$Http.get(url)
      this.unitData = data
    },
    // 获取考核类型列表
    async getTypeList () {
      var url = 'Assess/GetCheckType_Assess?TYPENAME='
      let { data } = await this.$Http.get(url)
      this.typeData = data
    },
    // 获取考核项目列表
    async getItemList () {
      var url = 'Assess/GetCheckItem_Assess?KEY='
      let { data } = await this.$Http.get(url)
      this.itemData = data
    },

    // 获取案件整改任务列表
    async getInfoList () {
      var url = 'Assess/GetResultKeyList_Assess?CLIENT_NO=' + this.DW + '&CHECKTYPE=' + this.LX + '&STARTDATE=' + this.STARTDATE
        + '&ENDDATE=' + this.ENDDATE + '&STATUS=' + this.ZT + '&CHECKITEM=' + this.XM + '&OBJECTNAME=' + this.NAME
      let { data } = await this.$Http.get(url)
      this.originalData = data
    },

    // 打开详情
    async guidanceRecord (index, row) {
      this.form = Object.assign({}, this.form, row);
      var url = 'Assess/GetResultDetail_Assess?RID=' + this.form.ID
      let { data } = await this.$Http.get(url)
      this.commandData = data
      this.showGuidanceVisible = true

      // this.commandData = [
      //   { "name": "道路积尘", "type": "道路每1千平方积尘不得多余10克", "assess": "10" },
      //   { "name": "路面垃圾", "type": "道路目视有明显垃圾", "assess": "5" },]
    },

    // 打开整改记录
    async rectificationRecord (index, row) {
      this.form = Object.assign({}, row);
      var url = 'Assess/GetResultZGDetail_Assess?RID=' + row.ID
      let { data } = await this.$Http.get(url)
      this.commandData = data
      this.showRecordVisible = true
    },

    // 打开修改分数窗口
    modifyScore (index, row) {
      this.score = Object.assign({}, row);
      this.showRecordVisible = false;
      this.isModifyScore = true;
    },

    // 修改
    changeScore () {
      this.commandData.forEach(item => {
        item.POINTN = this.score.POINT
      })
      this.isModifyScore = false;
      this.showRecordVisible = true;
    },

    // 督办意见下发
    async addCommand () {
      this.$axios({
        url: 'Assess/SaveResultKeyCheck_Assess',
        method: 'get',
        params: {
          RID: this.form.ID,
          CLIENT_NO: this.form.CLIENT_NO,
          CONTENT: this.form.CONTENT,
        },

      }).then((res) => {
        console.log(this.data)
        console.log(res)
        if (res.data.IsSucess) {
          this.$message.success('下发成功');
          this.showRecordVisible = false
          this.getInfoList()
        } else {
          this.$message.error('下发失败');
        }
      })
    },
    // 督办记录
    async handleEdit (index, row) {
      this.form = Object.assign({}, row);
      var url = 'Assess/GetResultKeyDetail_Assess?RID=' + row.ID
      let { data } = await this.$Http.get(url)
      this.rectificationData = data
      this.isVisibleEdit = true
      // this.rectificationData = [{ "VID": "2", "TYPE": "2", "PARENT_ID": "0", "TITLE": "丰年北里", "REMARK": "小花园落叶多", "AUDIO": "", "VIDEO": "http://photo-srw-hb2.oss-cn-beijing.aliyuncs.com/20211103_102406.3gp", "TIME": "2023/5/11 10:28:07", "ID": "14", "CLIENT_NO": null, "ORIENTATION_TIME": "2024/10/11 10:28:07", "ROADNAME": "丰年北里", "LOCATION": "中国天津市西青区华天道5号", "DETAIL": "小花园落叶多", "PHOTO1": "http://photo-srw-hb2.oss-cn-beijing.aliyuncs.com/fk-Android-1赵连成IMG_20211103_102733.jpg", "PHOTO2": "", "PHOTO3": "", "PHOTO4": "", "PHOTO5": "", "PHOTO6": "", "PHOTO7": "", "PHOTO8": "", "PHOTO9": "", "Lng": null, "Lat": null, "RecordPath": "", "VideoPath": "http://photo-srw-hb2.oss-cn-beijing.aliyuncs.com/20211103_102406.3gp", "LONGITUDE": 117.11179, "LATITUDE": 39.094559, "DIRECTION": null }]
    },
    changeHandler () {

    },
    handleClose (tag) {
      this.contentTags.splice(this.contentTags.indexOf(tag), 1);

    },
    handleClose1 (tag) {
      this.conditionTags.splice(this.conditionTags.indexOf(tag), 1);
    },

    showInput () {
      this.inputVisible = true;
      this.$nextTick(_ => {
        this.$refs.saveTagInput.$refs.input.focus();
      });
    },

    handleInputConfirm () {
      let inputValue = this.inputValue;
      if (inputValue) {
        this.contentTags.push(inputValue);
      }
      this.inputVisible = false;
      this.inputValue = '';
    },
    handleInputConfirm1 () {
      let inputValue = this.inputValue;
      if (inputValue) {
        this.conditionTags.push(inputValue);
      }
      this.inputVisible = false;
      this.inputValue = '';
    },

    // 导入Excel
    onChange (file, fileList) {
      //  console.log(fileList);
      this.fileData = file; // 保存当前选择文件
      this.readExcel(); // 调用读取数据的方法
    },
    // 读取数据
    readExcel (e) {
      let that = this;
      const files = that.fileData;
      console.log(files);
      if (!files) {
        //如果没有文件
        return false;
      } else if (!/\.(xls|xlsx)$/.test(files.name.toLowerCase())) {
        this.$message.error("上传格式不正确，请上传xls或者xlsx格式");
        return false;
      }
      const fileReader = new FileReader();
      console.log(fileReader)
      fileReader.onload = ev => {
        try {
          const data = ev.target.result;
          //  console.log(ev.target)
          //  console.log(this);
          const workbook = this.XLSX.read(data, {
            type: "binary"// 以字符编码的方式解析
          });

          if (workbook.SheetNames.length >= 1) {
            //  this.$message({
            //    message: "导入数据表格成功",
            //    showClose: true,
            //    type: "success"
            //  });

            const wsname = workbook.SheetNames[0]; //取第一张表
            const ws = this.XLSX.utils.sheet_to_json(workbook.Sheets[wsname]); //生成json表格内容
            console.log(ws)
            this.inputExcelDataLength = ws.length
            this.fullscreenLoading = this.$loading({
              lock: true,
              text: 'Loading',
              spinner: 'el-icon-loading',
              background: 'rgba(0, 0, 0, 0.7)'
            })
            for (let i = 0, len = ws.length; i < len; i++) {
              var item = ws[i]
              //   var sheetData = {
              //     VID: item['居民电话'],
              //     RUBBISH_NAME: item["垃圾品名"],
              //     WEIGHT: item["垃圾称重"],
              //     photo: '',
              //     LONGITUDE: 0,
              //     LATITUDE: 0
              //   }
              //   let exceldata =  []
              //   exceldata.push(sheetData)
              this.addWeight(item)
            }
          } else {
            this.$message.error("未读取到表格内容");
          }
        } catch (e) {
          return false;
        }
      };
      // 如果为原生 input 则应是 files[0]
      fileReader.readAsBinaryString(files.raw);
    },
    async addWeight (item) {
      this.$axios({
        url: 'CarService/AddCarAddWaterInfo',
        method: 'post',
        data: {
          WaterCPH: item['车牌照号'],
          WaterTime: item['加水时间'],
          CreateTime: item['上传时间'],
          WaterNumber: item['加水量（吨）'],
          WaterLocation: item['加水地点'],
          WaterCphType: item['加水类型'],
          WaterPeople: item['加水人员'],
          WaterPeopleID: item['加水人员编号'],
        }
      }).then(res => {
        console.log(res)
        this.inputExcelDataIndex++

        if (res.data.IsSucess) {
          this.fullscreenLoading.close()
          this.$message.success('表格文件导入成功')
          this.getlistdata()
        } else {
          this.fullscreenLoading.close()
          this.$message.error('表格文件导入失败' + '，' + res.data.Message);

        }
        if (this.inputExcelDataIndex == this.inputExcelDataLength) {
          this.fullscreenLoading.close()
          if (this.strError.length == 0) {
            this.$message.success('表格文件导入成功')
          } else {
            // this.$message.error('表格文件导入结束<br/>' + this.strError);
            this.$message({
              message: '表格文件导入结束，' + this.strError,
              type: 'error',
              duration: 5000
            })
          }
          this.getlistdata()
        }
      })
      //   })
    },
    // 导出Excel
    exportExcel () {
      let excelName = '车辆加水记录'
      const tHeader = ['加水记录编号', '车牌照号', '加水时间', '上传时间', '加水量（吨）', '加水地点', '加水类型', '加水人员', '加水人员编号']
      const filterVal = ['ID', 'WaterCPH', 'WaterTime', 'CreateTime', 'WaterNumber', 'WaterLocation', 'WaterCphType', 'WaterPeople', 'WaterPeopleID']
      export2Excel(tHeader, filterVal, this.tableData, excelName)
    },
    // 打开新增窗口
    handleAdd () {
      this.addDialogTitle = '新增车辆加水信息'
      //清空编辑框
      this.form = {
        WaterCPH: "",
        WaterTime: "",
        CreateTime: "",
        WaterNumber: "",
        WaterLocation: "",
        WaterCphType: "",
        WaterPeople: "",
        WaterPeopleID: "",
      }
      //展示窗口
      this.isVisibleEdit = true;
      // this.idEdit = false;
    },
    // 模糊查询
    // screeningData () {
    //   this.tableData = this.originalData
    //   if (this.select.CPH) this.tableData = this.tableData.filter(item => item.CPH.includes(this.select.CPH))
    // },
    // 分页导航
    handlePageChange (currentPage) {
      this.currentPage = currentPage;
      // console.log(this.currentPage)
      // this.$set(this.query, 'pageIndex', val);
      // this.getlistdata();
    },
    handleSizeChange (size) {
      this.pageSize = size;
      console.log(this.pageSize)
    },
    
    // 放大图片
    bigImage (row) {
      // this.srcBig = row.PHOTO
      this.imageList = []
      if (row.PHOTO != '') {
        this.imageList.push(row.PHOTO)
      }
      // if (row.PHOTO1 != '') {
      //   this.imageList.push(row.PHOTO1)
      // }
      // if (row.PHOTO2 != '') {
      //   this.imageList.push(row.PHOTO2)
      // }
      // if (row.PHOTO3 != '') {
      //   this.imageList.push(row.PHOTO3)
      // }
      // if (row.PHOTO4 != '') {
      //   this.imageList.push(row.PHOTO4)
      // }
      // if (row.PHOTO5 != '') {
      //   this.imageList.push(row.PHOTO5)
      // }
      // if (row.PHOTO6 != '') {
      //   this.imageList.push(row.PHOTO6)
      // }
      // if (row.PHOTO7 != '') {
      //   this.imageList.push(row.PHOTO7)
      // }
      // if (row.PHOTO8 != '') {
      //   this.imageList.push(row.PHOTO8)
      // }
      // if (row.PHOTO9 != '') {
      //   this.imageList.push(row.PHOTO9)
      // }
      this.showBigDialogVisible = true
    },
    playRecord (index, row) {
      var recordPath = row.RecordPath
      var player = $('<amr src="' + recordPath + '"  crossOrigin="anonymous"></amr>')
      player = new amrEvent($(player));
      player && player.play(function (playing) {
        console.log("current player playing ?? " + playing)
      })
    },
    //播放语音
    openRecording (index, row) {
      let url = row.RecordPath
      // let url = _url.split('.com')[1]
      let vm = this
      if (vm.playRec !== null) {
        vm.stopPlayVoice()
      }
      vm.playRec = new BenzAMRRecorder()
      //⚠️注意跨域问题
      vm.playRec.initWithUrl('/record' + url).then(function () {
        vm.voiceActive = index
        vm.playRec.play()
        vm.playRec.onEnded(function () {
          vm.voiceActive = null
        })
      }).catch((e) => {
        console.log(e)
        vm.$message.error('播放录音失败')
      })
    },
    //停止播放
    stopPlayVoice () {
      if (this.playRec.isPlaying()) {
        this.playRec.stop()
      }
    },
    playVideo (index, row) {
      if (row.VEDIO != '' && row.VEDIO != null) {
        this.VEDIO = row.VEDIO
        this.showVideoDialogVisible = true;
      } else {
        this.$message.error('未上传视频')
      }

    },
  }
}
</script>
<style>
.el-form-item__label {
  text-align: left;
}
/* .el-checkbox {
  color: #fff;
}
.el-checkbox__label {
  color: #fff !important;
} */
.content {
  overflow-y: scroll;
}
.el-col-6 {
  width: 350px;
  min-height: 50px;
}
.el-table th {
  height: 40px;
}
.el-form-item label {
  width: 80px;
}
.el-tag + .el-tag {
  margin-left: 10px;
}
.button-new-tag {
  margin-left: 10px;
  height: 32px;
  line-height: 30px;
  padding-top: 0;
  padding-bottom: 0;
}
.input-new-tag {
  height: 32px;
  line-height: 30px;
  width: 90px;
  margin-left: 10px;
  vertical-align: bottom;
}
.aroundtop {
  padding: 10px;
  background-color: #007acc;
  height: 100%;
  border-radius: 5px;
}
.el-icon-speed {
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  height: 30px;
  line-height: 28px;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  margin: 10px 20px 10px 20px;
}
</style>